export default defineNitroPlugin(async () => {
    try {
        console.log("初始化mysql数据库---->开始");
        const db = useDatabase();
        // 创建集团表
        // await db.sql`CREATE TABLE IF NOT EXISTS groups (id  varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID') ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;`;
        // 创建用户表
        // await db.sql`CREATE TABLE IF NOT EXISTS users (id  varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID') ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;`;

    } catch (error) {
        console.error("初始化mysql数据库失败,错误信息:", error);
    }
})
